const ModelInfoEnum = Object.freeze({
  model_id: '模型ID',
  model_name: '模型名称',
  project_id: '项目ID',
  project_name: '项目名称',
  training_rounds: '训练回合',
  model_layers: '模型层数',
  model_size_mb: '模型大小',
  parameter_count: '参数数量',
  last_update: '更新时间',
  model_description: '模型描述'
})

const TrainingConfigEnum = Object.freeze({
  pretrained_model: '预训练模型',
  model_structure: '模型结构',
  training_rounds: '训练回合',
  batch_size: '批量大小',
  early_stopping_rounds: '早停轮数',
  training_device: '训练设备',
  data_threads: '数据线程',

  optimizer: '优化器',
  random_seed: '随机种子',
  deterministic_mode: '确定性模式',
  forced_single_class: '强制单分类',
  weighted_image_mode: '加权图像模式',
  rectangular_training: '矩形训练',
  cosine_lr_scheduler: '余弦学习率调度',
  mask_overlap: '掩码重叠',
  dropout_regularization: 'Dropout正则化',

  initial_lr: '初始学习率',
  cyclical_lr: '循环学习率',
  lr_momentum: '学习率动量',
  weight_decay: '权重衰减',
  warmup_rounds: '热身回合',
  warmup_momentum: '热身动量',
  warmup_initial_lr: '热身初始学习率',
  nominal_batch_size: '名义批量大小',
  mask_sampling_ratio: '掩码采样比'
})

const modelInfo = {
  model_id: 'MX235322',
  model_name: 'TEST001',
  project_id: 'XM4574444',
  project_name: 'XM2',
  training_rounds: 200,
  model_layers: 320,
  model_size_mb: 72.36,
  parameter_count: 2589654,
  last_update: '2024-12-09 14:45:23',
  model_description: '本模型用于XXX项目进行目标检测，有疑问请咨询负责人admin。'
}

const training_config = {
  basic_settings: {
    pretrained_model: true, // 启用预训练模型
    model_structure: 'Large', // 模型结构
    training_rounds: 100, // 训练回合
    batch_size: 'auto', // 批量大小自动
    early_stopping_rounds: 'auto', // 早停轮数自动
    training_device: 'auto', // 训练设备自动
    data_threads: 5 // 数据线程数
  },

  training_config: {
    optimizer: 'SGD', // 优化器：SGD
    random_seed: 5, // 随机种子
    deterministic_mode: true, // 启用确定性模式
    forced_single_class: false, // 强制单分类：未启用
    weighted_image_mode: true, // 加权图像模式：启用
    rectangular_training: true, // 矩形训练：启用
    cosine_lr_scheduler: true, // 余弦学习率调度：启用
    mask_overlap: true, // 掩码重叠：启用
    dropout_regularization: 0.5 // Dropout正则化：0.5
  },

  learning_parameters: {
    initial_lr: 0.01, // 初始学习率
    cyclical_lr: 0.01, // 循环学习率
    learning_rate_momentum: 0.937, // 学习率动量
    weight_decay: 0.0005, // 权重衰减
    warmup_rounds: 2, // 热身回合
    warmup_momentum: 0.8, // 热身动量
    warmup_initial_lr: 0.1, // 热身初始学习率
    nominal_batch_size: 64, // 名义批量大小
    mask_sampling_ratio: 1 // 掩码采样比
  }
}

export { ModelInfoEnum, TrainingConfigEnum, modelInfo, training_config }
